package com.vsd.service;


import java.util.Collection;
import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;

import com.alibaba.fastjson.JSONObject;
import com.shopcart.daoEx.model.StoreGoodsEx;
import com.shopcart.domain.StoreGoods;
import com.zy.store.proto.MOAppStore.MStoreGoodsCate;
import com.zy.store.proto.MOAppStore.MTgGoodsMiniList;

public interface StoreGoodsService {

	MTgGoodsMiniList.Builder findGuess(String lat,String lng);
	
	Collection<StoreGoods> findByStoreIdAndType(String storeId,Integer type);
	
	Collection<StoreGoods> findByStoreIdAndCateCodeAndType(String storeId,String cateId,Sort sort);
	
	MStoreGoodsCate.Builder findAppList(String storeId,String cateId,String cateName);
	
	MStoreGoodsCate.Builder findAppListByType(String storeId,Integer type);
	
	StoreGoods findById(String id);
	
	Collection<StoreGoods> findByIds(String ids);

	Page<StoreGoods> findAll(Pageable p);
	
	Page<StoreGoods> findByNameLike(String search,Pageable p);

	StoreGoods save(StoreGoods goods);

	int updateByPrimaryKeySelective(StoreGoods goods);

	List<StoreGoodsEx> findExList(String areaCode, String cateCode,
			String name,String storeId, Integer type,Integer page, Integer limit);

	JSONObject findList(String storeId, String cateId, String cateName);

}
